GXRotateTransform
You can use theGXRotateTransform
function to alter the mapping property of a transform object so that it rotates its associated shape a specified number of degrees around a specified origin.
void GXRotateTransform(gxTransform target, Fixed degrees, Fixed xOffset, Fixed yOffset);
target
- A reference to the transform object whose mapping property you want to alter.
degrees
- The amount to rotate.
xOffset
- The horizontal coordinate of the origin to rotate around.
yOffset
- The vertical coordinate of the origin to rotate around.
DESCRIPTION
TheGXRotateTransform
function calculates a new mapping matrix for the transform object referenced by thetarget
parameter. When applied to a shape, the new mapping matrix performs the same mapping transformations on the shape as the original matrix, but the new matrix also rotates the shape by the number of degrees specified in thedegrees
parameter around the origin specified by thexOffset
andyOffset
parameters.The coordinates of the origin are specified in local space.
ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory transform_is_nil Warnings rotate_transform_out_of_range Notices (debugging version) mapping_unaffected SEE ALSO
For an example of the use of this function, see Listing 6-3 on page 6-25.For information about mapping matrices in general, see the mathematics chapter of Inside Macintosh: QuickDraw GX Environment and Utilities.
To rotate a shape by altering its geometry, use the
GXRotateShape
function, described on page 6-70.